from django.contrib import admin
from django.apps import apps


# Register your models here.
class AllModelAdmin:
    pass


models = apps.get_models()

# 使用for循环注册每个模型
for model in models:
    if not admin.site.is_registered(model):
        admin.site.register(model)
